﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Example.Moq
{
    public class CustomerService
    {
		 private ICustomerRepository _repository;

		 public CustomerService( ICustomerRepository repository )
		 {
			 _repository = repository;
		 }

		 public Customer GetCustomer( int id )
		 {
			 var business = new CustomerBusiness();
			 
			 if( business.ValidateId( id ) )
			 {
				 return _repository.GetCustomer( id );
			 }

			 return null;
		 }
    }
}
